package licode.unisop.unilite.result;

import lombok.Getter;

/**
 * 统一异常定义
 *
 * @author licode
 */
@Getter
public class UniException extends RuntimeException {
    private final int code;

    public UniException(int code, String error) {
        super(error);
        this.code = code;
    }

    public static void throwBy(int code, String error) {
        throw new UniException(code, error);
    }
}
